]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-theme-node: Add method to invalidate drawing state
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 20 Sep 2012 19:44:21 +0000 (21:44 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 24 Sep 2012 20:03:05 +0000 (22:03 +0200)
StThemeNode caches its resources aggressively to keep the required
work on paint to a minimum - right now, resources are only recreated
on allocation changes.
In order to update the background-image property correctly when the
underlying file changes, resources need to be recreated without a
size change, so add an explicit method for that.

https://bugzilla.gnome.org/show_bug.cgi?id=679268

src/st/st-theme-node-drawing.c
src/st/st-theme-node.h

index 8e58141846571a7ffb23278c5a535cf810bc997d..c3424f9fd516ba725f7a57c280a363673fe7eb3e 100644 (file)
@@ -2088,3 +2088,10 @@ st_theme_node_copy_cached_paint_state (StThemeNode *node,
     if (other->corner_material[corner_id])
       node->corner_material[corner_id] = cogl_handle_ref (other->corner_material[corner_id]);
 }
+
+void
+st_theme_node_invalidate_paint_state (StThemeNode *node)
+{
+  node->alloc_width = 0;
+  node->alloc_height = 0;
+}
index 795f875c1824e726388627bb1e79f60666eb437f..2c672ebcfb2fd02477dea0169413991d4a80fdbd 100644 (file)
@@ -244,6 +244,7 @@ void st_theme_node_paint (StThemeNode            *node,
 
 void st_theme_node_copy_cached_paint_state (StThemeNode *node,
                                             StThemeNode *other);
+void st_theme_node_invalidate_paint_state  (StThemeNode *node);
 
 G_END_DECLS